using System.Collections.Generic;

namespace Rubikev.Common.Data
{
  /// <summary>
  /// Interface for applying a filter to a collection of entities
  /// </summary>
  /// <typeparam name="TEntity">The type of entity to filter</typeparam>
  public interface IFilter<TEntity>
  {
    /// <summary>
    /// Applies a filter to the <paramref name="unfilteredEntities"/>
    /// </summary>
    /// <param name="unfilteredEntities">The entities to filter</param>
    /// <returns>The filtered entities</returns>
    IEnumerable<TEntity> Filter(IEnumerable<TEntity> unfilteredEntities);
  }
}